home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / News Stacks / Feb '90AMUG News™.cpt / Feb '90AMUG News™ / card_16917.txt < prev    next >
Text File  |  1990-03-11  |  2KB  |  62 lines

  1. -- card: 16917 from stack: in
  2. -- bmap block id: 17217
  3. -- flags: 0000
  4. -- background id: 2135
  5. -- name: Diamond
  6.  
  7.  
  8. -- part 1 (field)
  9. -- low flags: 00
  10. -- high flags: 0000
  11. -- rect: left=11 top=60 right=321 bottom=261
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 0
  15. -- font id: 2
  16. -- text size: 10
  17. -- style flags: 0
  18. -- line height: 13
  19. -- part name: 
  20.  
  21.  
  22. -- part 2 (field)
  23. -- low flags: 00
  24. -- high flags: 0000
  25. -- rect: left=262 top=60 right=334 bottom=508
  26. -- title width / last selected line: 0
  27. -- icon id / first selected line: 0 / 0
  28. -- text alignment: 0
  29. -- font id: 2
  30. -- text size: 10
  31. -- style flags: 0
  32. -- line height: 13
  33. -- part name: 
  34.  
  35.  
  36. -- part contents for background part 1
  37. ----- text -----
  38. 24
  39.  
  40. -- part contents for card part 1
  41. ----- text -----
  42. procedure DoNetwork;
  43. procedure DoDriver;
  44. procedure DoApp1;
  45. procedure DoApp2;
  46. procedure DoApp3;
  47.  procedure DoApp4;
  48. procedure Init;
  49. function Next (eventMask: integer): Boolean; { returns True if an event of the type requested was found. }
  50. function Available (eventMask: integer): Boolean; { returns True if an event of the type requested is available. }
  51. procedure Loop;
  52. end;
  53. As shown in example 5, DoMouseDown first determines where the event occurred (by calling FindWindow).  If the event occurred on the desktop, DoMouseDown does nothing.  If the event occurred in a menu, it sends 
  54.  
  55. -- part contents for card part 2
  56. ----- text -----
  57. a message to the global menu bar object 
  58. (theMenuBar) to dispatch a message to the appropriate object depending on the menu item that was chosen.  If the mouse down event occurred in a system window, the system is allowed to handle it by a call to the Toolbox routine, SystemClick.  If the event did not take place in any of the above locations, it assumes that the event was in a window and the appropriate message is sent to TWindow.
  59.     Notice that the object reference is retrieved from the window record's refcon field.  However, the refcon is defined as a LongInt and hence casting to the TWindow type is necessary for the compiler to accept the statement.  
  60. When the window
  61.  object was created, 
  62. the object reference